import request from "@/utils/request";


export let findTruckList = (data) =>
    request({
        method: "post",
        url: "pdTruck/findTruckList",
        data: data
    })

    export let ShowPdTruckType = (data) =>
    request({
        method: "get",
        url: "pdTruckType/ShowPdTruckType",
        data:data
    })

    export let ShowPdFleet = (data) =>
    request({
        method: "get",
        url: "pdFleet/findPdFleetList",
        data:data
    })

    export let AddPdTruck = (data) => {
        return request({
            method: "post",
            url: "pdTruck/AddPdTruck",
            data: data
        })
    }


    export let ShowTruckLicense = (data) =>
    request({
        method: "get",
        url: "pdTruckLicense/ShowTruckLicense",
        data:data
    })

    export let ShowTransportTrips = (data) =>
    request({
        method: "get",
        url: "pdTransportTrips/ShowTransportTrips",
        data:data
    })

    export let DeleteTruckByid = (truckId) =>
    request({
        method: "delete",
        url: "pdTruck/DeleteTruckByid",
        params:{truckId:truckId}
    })

    export let SaveTruck = (data) => {
        return request({
            method: "put",
            url: "pdTruck/SaveTruck",
            data: data
        })
    }

    export let BaseTruckTypeList = (data) =>
    request({
        method: "post",
        url: "pdTruckType/BaseTruckTypeList",
        data:data
    })

    export let ShowPdGoodsType = (data) =>
    request({
        method: "get",
        url: "pdTruckType/ShowPdGoodsType",
        data:data
    })

    export let AddTruckType = (data) => {
        return request({
            method: "post",
            url: "pdTruckType/AddTruckType",
            data: data
        })
    }

    export let DeleteTruckTypeByid = (truckTypeId) =>
    request({
        method: "delete",
        url: "pdTruckType/DeleteTruckTypeById",
        params:{truckTypeId:truckTypeId}
    })

    export let UpdateTruckType = (data) => {
        return request({
            method: "put",
            url: "pdTruckType/UpdateTruckType",
            data: data
        })
    }

    export let DeleteGoodsTruck = (truckTypeId) =>
    request({
        method: "delete",
        url: "pdTruckType/DeleteGoodsTruck",
        params:{truckTypeId:truckTypeId}
    })

    export let findTransportLineType = (data) =>
    request({
        method: "post",
        url: "pdTransportLineType/findTransportLineType",
        data:data
    })

    export let AddTransportLineType = (data) => {
        return request({
            method: "post",
            url: "pdTransportLineType/AddTransportLineType",
            data: data
        })
    }

    export let UpdateTransportLineType = (data) => {
        return request({
            method: "put",
            url: "pdTransportLineType/UpdateTransportLineType",
            data: data
        })
    }

    export let DeleteTransportLineTypeByid = (id) =>
    request({
        method: "delete",
        url: "pdTransportLineType/DeleteTransportLineTypeByid",
        params:{id:id}
    })

    export let findTruckDriverList = (data) =>
    request({
        method: "post",
        url: "pdTruckDriver/findTruckDriverList",
        data:data
    })

    export let UpdateFleetByDriver = (data) => {
        return request({
            method: "put",
            url: "pdTruckDriver/UpdateFleetByDriver",
            data: data
        })
    }


